<template>
  <div>
    <p>Tab展示数据</p>
    <button @click="getMovieList">获取数据</button>
    <ul>
      <li v-for="item in movieList" :key="item.id">{{ item.albumName }}</li>
    </ul>
    <h3>2-7之间长度的电影</h3>
    <ul>
      <li v-for="item in myMovieList" :key="item.id">{{ item.albumName }}</li>
    </ul>
    <h3>我输入的长度的</h3>
    <ul>
      <li v-for="item in SearchList" :key="item.tvId">{{ item.albumName }}</li>
    </ul>
  </div>
</template>

<script>
import { mapActions, mapGetters, mapState } from "vuex";
export default {
  name: "Tab",
  methods: {
    ...mapActions("data", ["getMovieList"]),
  },
  computed: {
    ...mapState("data", ["movieList"]),
    ...mapGetters("data", ["myMovieList"]),
    SearchList() {
      return this.$store.getters["data/SearchList"]({ key: 8 });
    },
  },
};
</script>

<style>
</style>